<%-- 
    Document   : ads_view
    Created on : Apr 20, 2012, 12:21:09 PM
    Author     : fikri
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>.: ${titile} :.</title>
        <script type="text/javascript">
            $(document).ready ( function(){
                $('#thumbs').delegate('img','click', function(){                
                    $('#largeImage').attr('src',$(this).attr('src'));                   
                });
            });
            
           
        </script>
    </head>
    <body>
        <s:form beanclass="com.apps.epocket.stripes.action.AdsActionBean">
            <div id="center" class="column">

                <div id="content"> 

                    <h1>  ${actionBean.ads.namaIklan}&nbsp;</h1>                   


                    <div class="">
                        <div id="page">
                            <div id="gallery">
                                <c:set var="first_img"/>
                                <div id="thumbs">
                                    <c:forEach items="${actionBean.ads.senaraiDokumenPengiklanan}" var="item" varStatus="line">
                                        <c:if test="${empty first_img}">
                                            <c:set var="first_img" value="${pageContext.request.contextPath}/dokumen/view/${item.idDokumenIklan}"/>
                                        </c:if>
                                        <img src="${pageContext.request.contextPath}/dokumen/view/${item.idDokumenIklan}" alt="1st image description"  width="50" height="50" />                                        
                                    </c:forEach>
                                </div>
                                <div id="panel">
                                    <img  id="largeImage" src="${first_img}" width="400" height="300"/>                                      
                                </div>
                            </div>
                        </div>
                    </div>
                    <br/>

                    <p>
                        <label>Advertised by :</label>
                        ${actionBean.ads.namaPengiklan}&nbsp;
                    </p>
                    <p>
                        <label>Email :</label>
                        ${actionBean.ads.emailPengiklan}&nbsp;
                    </p>
                    <p>
                        <label>Price :</label>
                        RM <fmt:formatNumber value="${actionBean.ads.hargaIklan}" pattern="#,###.00"/>&nbsp;
                    </p> 

                    <p>
                        <label>Phone Number :</label>
                        ${actionBean.ads.noTel}&nbsp;
                    </p>
                    <p>
                        <label>Ad Text :</label>
                        <textarea readonly="readonly" style="background:transparent;border:none;overflow: hidden;">${actionBean.ads.catatanIklan}
                        </textarea>&nbsp;
                    </p>

                </div>

            </div>
        </s:form>
    </body>
</html>
